/**
 * Copyright &copy; 2020 <a href="https://github.com/somowhere/exam-system">exam-system</a> All rights reserved.
 */
package com.shanhesoft.java.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shanhesoft.java.common.core.vo.PageModel;
import com.shanhesoft.java.common.persistence.service.impl.DataServiceImpl;
import com.shanhesoft.java.modules.exam.domain.TVTrainQa;
import com.shanhesoft.java.modules.exam.domain.dto.TVTrainQaDto;
import com.shanhesoft.java.modules.exam.domain.vo.TVTrainQaVo;
import com.shanhesoft.java.modules.exam.repository.TVTrainQaRepository;
import com.shanhesoft.java.modules.exam.service.TVTrainQaService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 实验问答ServiceImpl 实验问答
 * @author superadmin
 * @version 2021-01-26 23:29:16
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TVTrainQaServiceImpl extends DataServiceImpl<TVTrainQaRepository, TVTrainQa, TVTrainQaDto, String> implements TVTrainQaService{
	@Override
	public void saveOrUpdate(TVTrainQaDto tVTrainQaDto) {
																super.saveOrUpdate(tVTrainQaDto);
	}

	/**
	 * 按楼主评论分页
	 * @param pm
	 * @param wrapper
	 * @return
	 */
	@Override
	public IPage<TVTrainQaVo> findPage(PageModel pm, QueryWrapper wrapper) {
		IPage<TVTrainQaVo> page = repository.findArticleByVid(pm, wrapper);
		return page;
	}
}
